<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Text */ ?>
<script id="custom-option-text-type-template" type="text/x-jquery-tmpl">
    <div id="product_option_${option_id}_type_${group}" class="fieldset">
        <table class="data-table" cellspacing="0">
            <thead>
            <tr>
                <?php if ($this->getCanReadPrice() !== false) : ?>
                <th class="type-price"><?php echo __('Price') ?></th>
                <th class="type-type"><?php echo __('Price Type') ?></th>
                <?php endif; ?>
                <th class="type-sku"><?php echo __('SKU') ?></th>
                <th class="type-last last"><?php echo __('Max Characters') ?></th>
            </tr>
            </thead>
            <tr>
                <?php if ($this->getCanReadPrice() !== false) : ?>
                <td class="opt-price">
                    <input id="product_option_${option_id}_price"
                           name="product[options][${option_id}][price]"
                           class="input-text validate-number product-option-price"
                           type="text" value="${price}" data-store-label="${price}"
                        <?php if ($this->getCanEditPrice() === false) : ?>
                           disabled="disabled"
                        <?php endif; ?>>
                </td>
                <td class="opt-price-type"><?php echo $this->getPriceTypeSelectHtml() ?>{{html checkboxScopePrice}}</td>
                <?php else : ?>
                <input id="product_option_${option_id}_price" name="product[options][${option_id}][price]" type="hidden">
                <input id="product_option_${option_id}_price_type" name="product[options][${option_id}][price_type]" type="hidden">
                <?php endif; ?>
                <td>
                    <input name="product[options][${option_id}][sku]" class="input-text" type="text" value="${sku}">
                </td>
                <td>
                    <input name="product[options][${option_id}][max_characters]" class="input-text validate-zero-or-greater" type="text" value="${max_characters}">
                </td>
            </tr>
        </table>
    </div>
</script>
